<template>
  <van-area title="标题" :area-list="areaList" />
</template>

<script>
import { defineComponent } from "vue";
export default defineComponent({
  name: "zheng-date-picker",
  props: {
    currentDate: {
      type: String
    }
  },

  setup(props,{ emit }) {
    console.log(props)
    const currentDate = props.currentDate.split("-");
    const columnsType = ['year', 'month', 'day'];
    const onConfirm = (value)=>{
      emit('date-confirm-click', value.selectedValues.join(",").replace(/,/g,"-"))
    }
    return {
      columnsType,
      currentDate,
      minDate: new Date(2020, 0, 1),
      maxDate: new Date(2025, 5, 1),
      onConfirm
    };
  },

});
</script>
